﻿using MediatR;
using RBAC.MaHaiBo.API.Application.Command.UserRoleCommand;
using RBAC.MaHaiBo.Service;

namespace RBAC.MaHaiBo.API.Application.CommandHandlers.UserRoleHandler
{
    public class UserRoleBackfill1CommanddHandler : IRequestHandler<UserRoleBackfill1Commandd, List<int>>
    {
        IUserRoleService urSer;

        public UserRoleBackfill1CommanddHandler(IUserRoleService urSer)
        {
            this.urSer = urSer;
        }

        public async Task<List<int>> Handle(UserRoleBackfill1Commandd request, CancellationToken cancellationToken)
        {
            return await urSer.Backfilluid(request.Rid);
        }
    }
}
